<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>Ajax</title>
</head>

<body>
  <div class="container">
    <h1 id="textoTrocar">Mudando o texto</h1>
    <button class="btn btn-primary" id="texto">Mudar</button>
  </div>

  <script src="ajax.js"></script>

</body>

</html>